//
//  UIset+Extension.swift
//  新浪微博01
//
//  Created by 李国伟 on 15/12/7.
//  Copyright © 2015年 李国伟. All rights reserved.
//

import UIKit

extension UILabel{
    
    convenience init(title:String ,fontsize: CGFloat = 14 ,screenInset: CGFloat = 0, color:UIColor = UIColor.darkGrayColor()){
        self.init()
        text = title
        textColor = color
        numberOfLines = 0
        font = UIFont.systemFontOfSize(fontsize)
        if screenInset == 0{
            textAlignment = .Center
        }else{
            preferredMaxLayoutWidth = UIScreen.mainScreen().bounds.width - 2 * screenInset
            textAlignment = .Left
        }
    }
}
